package com.zpark.controller;

import com.zpark.pojo.User;
import com.zpark.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @RequestMapping("/login.do")
    public String login(User user){
        User user2 = userService.login(user);
        // 将user2绑定到session域当中
        return "main";
    }
}
